<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="/vraptor-blank-project/bootstrap/css/estilo.css">
    <link rel="stylesheet" type="text/css" href="/vraptor-blank-project/bootstrap/css/bootstrap.min.css">
	<title>Prato</title>
</head>
<body>

	<div class="jumbotron" id="jumbotron">
	<h1>Lista de Pratos</h1>

	</div>
	<div class="container">
<div class="bb">

            <c:if test="${administradorweb.isLogado()}">
				<h1>Administrador: ${administradorweb.nome}</h1>
				<a href="${linkTo[AdministradorController].logout}"><button class="btn btn-primary col-md-1 col-xs-offset-0">sair</button></a>
			
			</c:if>

 <table class="table table-bordered">
    <tr class="l1">
			<td>#</td>
			<td>Nome do Prato</td>
			<td>Ingredientes</td>
			<td>Valor Calorico</td>
			<td></td>
	</tr>
	<tbody>
	<c:forEach items="${pratoList}" var="prato">
	<tr>
		<td>${prato.idPrato}</td> 
		<td>${prato.nomePrato }</td>
		 <td>${ prato.ingredientes}</td>
		  <td>${ prato.vcalorico}</td>
		<td><a href="${linkTo[PratoController].delete}?id=${prato.idPrato}">Remover</a> - 
		<a href="${linkTo[PratoController].edit}?id=${prato.idPrato}">Editar</a></td> 
	</tr>
		
	</c:forEach>
	
	
	</tbody>
	</table>
	</div>

    </div>
    <div class="jumbotron" id="jumbotron">

	<button > <div class="panel-body">
	<a href="${linkTo[PratoController].add}">Adicionar Novo Prato</a>
	</div></button>
	<button>
	<div class="panel-body">
	<a href="${linkTo[CardapioController].add}">Adicionar Novo Cardapio</a>
	</div></button>
	<button >
	<div class="panel-body">
	<a href="${linkTo[CardapioController].list}">Lista de Cardapio</a>
	</div></button>
	<button >
	<div class="panel-body">
	<a href="${linkTo[UsuarioController].list}">Lista de Usuarios</a>
	</div></button>
	</div>
</body>
</html>